<template>
  <div class="page">
      <TopView :info="info"></TopView>
      <div class="page-content">
        <MenuView :info="info"></MenuView>
        <div class="page-content-right">
            <router-view></router-view>
        </div>
      </div>
    </div>
</template>
<script>
    import MenuView from './Menu.vue'
    import TopView from './Top.vue'
    import api from '../api'
    export default{
        data(){
            return {
                info:{
                    isCollapse:false,
                    listArr:[]
                }
            }
        },
        components:{
            MenuView,
            TopView
        },
        mounted(){
            let timer=setInterval(function(){
                this.getLogin();
            }.bind(this),1000);
            
        },
        methods:{
            getLogin(){
                api.$http('/system/getLogin',{},function(err,res){
                    console.log(res.data.msg);
                    if(res.data.code==0){
                        this.$router.push({path:"/system/login"});
                    }
                }.bind(this));
            }
        }
    }
</script>
<style scoped>
@import '../assets/css/index.css';
</style>

